package com.dingtalk.yuanhua_spring_project.repository;

import com.dingtalk.yuanhua_spring_project.pojo.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EmployeeRepository extends JpaRepository<Employee, Long> {
    boolean existsByJijinNameAndProjectNameAndEmployeeId(String jijinName, String projectName, String employeeId);
    @Query("SELECT e FROM Employee e WHERE e.hasPermission = false")
    List<Employee> findEmployeesWithNoPermission();
}
